using BepuPhysics.Collidables;
using BepuUtilities;
#if MYCODE
using BepuUtilities.Vectors;
#else
using System.Numerics;
#endif

namespace BepuPhysics.CollisionDetection
{
    public interface ISupportFinder<TShape, TShapeWide> where TShape : IConvexShape where TShapeWide : IShapeWide<TShape>
    {
        /// <summary>
        /// 获取支撑查找器是否正在采样具有球形边距的形状,该形状应在找到核心形状的解决方案后应用。
        /// </summary>
        bool HasMargin { get; }
        /// <summary>
        /// 根据此支撑查找器与形状关联的边距。
        /// </summary>
        /// <param name="Shape">要查找其边距的形状。</param>
        /// <param name="March">形状的边距。</param>
        void GetMargin(in TShapeWide shape, out Vector<float> margin);
        void ComputeLocalSupport(in TShapeWide shape, in Vector3Wide direction, in Vector<int> terminatedLanes, out Vector3Wide support);
        void ComputeSupport(in TShapeWide shape, in Matrix3x3Wide orientation, in Vector3Wide direction, in Vector<int> terminatedLanes, out Vector3Wide support);
    }

}
